import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-02-27
 * Time: 22:03
 */
public class Fibonacci {
    //斐波那契数列
    //递归
    public static int fibonacci(int n){
        if (n == 1 || n == 2){
            return 1;
        }
        return fibonacci(n -1) + fibonacci(n - 2);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int ret = fibonacci(n);
        System.out.println(ret);
    }
    //迭代
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int cur = 1;
        int curNext = 1;
        int count = 0;
        if (n == 1 || n== 2){
            System.out.println(1);
            return;
        }
        for (int i = 1; i < n - 1; i++) {
            count = cur + curNext;
            cur = curNext;
            curNext = count;
        }
        System.out.println(count);
    }*/
}
